package com.mmall.service;

import com.mmall.common.ServerResponse;
import com.mmall.pojo.User;

import javax.servlet.http.HttpSession;

/**
 * 用户信息Service接口
 * Created by Administrator on 2017/9/21-23:49.
 */
public interface IUserService {
    ServerResponse<User> login(String username, String password);

    ServerResponse<String> checkValid(String field, String type);

    ServerResponse<String> register(User user);

    ServerResponse<String> selectQuestion(String username);

    ServerResponse<String> checkAnswer(String username, String question, String answer);

    ServerResponse<String> forgetResetPassword(String username, String passwordNew, String forgetToken);

    ServerResponse<String> resetPassword(String passwordOld, String passwordNew, User user);

    ServerResponse<User> updateInfo(User newUser);

    ServerResponse<User> getInfo(int userId);

    ServerResponse adminCheck(User user);

    ServerResponse adminCheck(HttpSession session);
}
